#pragma once
#include "cmd.h"
#include "public.h"
#include "define_time.h"

class CPacketParse
{
public:

public:
	CPacketParse();
    unsigned short BLEndianUshort(unsigned short value);
    unsigned short CheckSumHeader(unsigned char* memTcpHeader, int nLen);
	void  	ParseCmd(char *pMsgBuf);
	~CPacketParse(){};
public:
	static CPacketParse* GetObject();	


    static CPacketParse* GetInstance();

    class GCp
    {
    public:
        ~GCp()
        {
            if (pPacketObj != nullptr)
                delete pPacketObj;
        }
    };

    static CPacketParse* pPacketObj;
    static std::mutex               mutex_p;
    static GCp                           gcp;

	
};
